/*
 * RessourceDef.cpp
 * This file is part of Dragon and Weed 2 
 *
 * Copyright (C) 2011 - François Berder, Syméon Malengreau
 
 *
 * Dragon and Weed 2 is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * Dragon and Weed 2 is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include "RessourceDef.hpp"


/* Default constructor. It is compulsory to give a name
 * for a ressource.
 * Note : size is only useful for a font.
 */
RessourceDef::RessourceDef(const std::string& name, 
						   const unsigned int size) : 
m_name(name),
m_size(size)
{}


/* This function compares name and size of each 
 * ressource def. This function is needed to use this 
 * class as a key in a map container.
 */
bool operator<(const RessourceDef& a, const RessourceDef& b)
{
	if(a.m_name < b.m_name || a.m_size < b.m_size)
		return true;

	return false;
}
